﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CinemaBookingProject.DBLayer;

public class CtrCustomer
{
    private DBCustomer dbc = new DBCustomer();

    public List<Customer> Read(string phoneNumber)
    {
        return dbc.Read(phoneNumber);
    }

    public List<Customer> ReadAll()
    {
        return dbc.ReadAll();
    }

    public int Insert(Customer cust)
    {
        return dbc.Insert(cust);
    }

    public int Delete(string phoneNumber)
    {
        return dbc.Delete(phoneNumber);
    }

    public Customer CustomerObject(string phoneNo, string name, string email, Booking booked)
    {
        Customer cust = new Customer(phoneNo);
        cust.Name = name;
        cust.Email = email;
        cust.Booking = booked;
        return cust;
    }
}

